package com.ch.home.bean;

import java.util.ArrayList;

/**
 * 发展历史
 * Created by CHEN on 2019/8/24.
 */
public class DishHistory {
    private Integer historyId;
    private Integer dishId;
    private String historyContent;//历史内容
    private String historyTime;//历史时间
    private Integer order;//发展顺序

    private ArrayList<String> url;
    private ArrayList<String> previewUrl;


    public DishHistory() {
    }

    public DishHistory(Integer historyId, Integer dishId, String historyContent, String historyTime, Integer order, ArrayList<String> url, ArrayList<String> previewUrl) {
        this.historyId = historyId;
        this.dishId = dishId;
        this.historyContent = historyContent;
        this.historyTime = historyTime;
        this.order = order;
        this.url = url;
        this.previewUrl = previewUrl;
    }

    public Integer getHistoryId() {

        return historyId;
    }

    public void setHistoryId(Integer historyId) {
        this.historyId = historyId;
    }

    public Integer getDishId() {
        return dishId;
    }

    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }

    public String getHistoryContent() {
        return historyContent;
    }

    public void setHistoryContent(String historyContent) {
        this.historyContent = historyContent;
    }

    public String getHistoryTime() {
        return historyTime;
    }

    public void setHistoryTime(String historyTime) {
        this.historyTime = historyTime;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public ArrayList<String> getUrl() {
        return url;
    }

    public void setUrl(ArrayList<String> url) {
        this.url = url;
    }

    public ArrayList<String> getPreviewUrl() {
        return previewUrl;
    }

    public void setPreviewUrl(ArrayList<String> previewUrl) {
        this.previewUrl = previewUrl;
    }

    @Override
    public boolean equals(Object o) {

        if (this == o) return true;
        if (o == null || getClass( ) != o.getClass( )) return false;

        DishHistory that = (DishHistory) o;

        if (historyId != null ? !historyId.equals(that.historyId) : that.historyId != null) return false;
        if (dishId != null ? !dishId.equals(that.dishId) : that.dishId != null) return false;
        if (historyContent != null ? !historyContent.equals(that.historyContent) : that.historyContent != null)
            return false;
        if (historyTime != null ? !historyTime.equals(that.historyTime) : that.historyTime != null) return false;
        if (order != null ? !order.equals(that.order) : that.order != null) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;
        return previewUrl != null ? previewUrl.equals(that.previewUrl) : that.previewUrl == null;
    }

    @Override
    public int hashCode() {
        int result = historyId != null ? historyId.hashCode( ) : 0;
        result = 31 * result + (dishId != null ? dishId.hashCode( ) : 0);
        result = 31 * result + (historyContent != null ? historyContent.hashCode( ) : 0);
        result = 31 * result + (historyTime != null ? historyTime.hashCode( ) : 0);
        result = 31 * result + (order != null ? order.hashCode( ) : 0);
        result = 31 * result + (url != null ? url.hashCode( ) : 0);
        result = 31 * result + (previewUrl != null ? previewUrl.hashCode( ) : 0);
        return result;
    }

    @Override
    public String toString() {
        return "DishHistory{" +
                "historyId=" + historyId +
                ", dishId=" + dishId +
                ", historyContent='" + historyContent + '\'' +
                ", historyTime='" + historyTime + '\'' +
                ", order=" + order +
                ", url=" + url +
                ", previewUrl=" + previewUrl +
                '}';
    }
}
